package com.daoeping.domain;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Usr_userProduction2 entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "usr_userproduction", catalog = "daoeping")
public class Usr_userProduction implements java.io.Serializable {

	// Fields

	private Integer id;
	private Usr_user usr_user;
	private Bsc_workyear bsc_workyear;
	private Bsc_jobtype bsc_jobtype;
	private Bsc_educational bsc_educational;
	private String description;
	private Date createdDate;
	private Date updateDate;
	
	private Usr_skill_detail usr_skill_detail;

	// Constructors

	/** default constructor */
	public Usr_userProduction() {
	}

	/** minimal constructor */
	public Usr_userProduction(Usr_user usr_user) {
		this.usr_user = usr_user;
	}

	/** full constructor */
	public Usr_userProduction(Usr_user usr_user, Bsc_workyear bsc_workyear,
			Bsc_jobtype bsc_jobtype, Bsc_educational bsc_educational, String description,
			Date createdDate, Date updateDate) {
		this.usr_user = usr_user;
		this.bsc_workyear = bsc_workyear;
		this.bsc_jobtype = bsc_jobtype;
		this.bsc_educational = bsc_educational;
		this.description = description;
		this.createdDate = createdDate;
		this.updateDate = updateDate;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name = "user_id")
	public Usr_user getUsr_user() {
		return usr_user;
	}

	public void setUsr_user(Usr_user usr_user) {
		this.usr_user = usr_user;
	}
	
	@ManyToOne
	@JoinColumn(name = "work_year_id")
	public Bsc_workyear getBsc_workyear() {
		return bsc_workyear;
	}

	public void setBsc_workyear(Bsc_workyear bsc_workyear) {
		this.bsc_workyear = bsc_workyear;
	}

	@ManyToOne
	@JoinColumn(name = "job_type_id")
	public Bsc_jobtype getBsc_jobtype() {
		return bsc_jobtype;
	}

	public void setBsc_jobtype(Bsc_jobtype bsc_jobtype) {
		this.bsc_jobtype = bsc_jobtype;
	}
	
	@ManyToOne
	@JoinColumn(name = "educational_level_id")
	public Bsc_educational getBsc_educational() {
		return bsc_educational;
	}

	public void setBsc_educational(Bsc_educational bsc_educational) {
		this.bsc_educational = bsc_educational;
	}

	@Column(name = "description", length = 4000)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "created_date", length = 10)
	public Date getCreatedDate() {
		return this.createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "update_date", length = 10)
	public Date getUpdateDate() {
		return this.updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	@OneToMany(cascade=CascadeType.ALL,mappedBy="Usr_userProduction")
	public void setUsr_skill_detail(Usr_skill_detail usr_skill_detail) {
		this.usr_skill_detail = usr_skill_detail;
	}
	
	

}